<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>


<title><fmt:message key="itemList.title"/></title>
<content tag="heading"><fmt:message key="itemList.heading"/></content>
<meta name="menu" content="ItemMenu"/>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/editItem.html"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<html:rewrite forward="mainMenu"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false"/>

<display:table name="itemList" cellspacing="0" cellpadding="0"
    id="itemList" pagesize="25" class="table itemList"
    export="true" requestURI="">

    <display:column property="itemId" sortable="true" headerClass="sortable"
        url="/editItem.html" paramId="itemId" paramProperty="itemId"
        titleKey="itemForm.itemId"/>
    <display:column property="num" sortable="true" headerClass="sortable"
         titleKey="itemForm.num"/>
    <display:column property="sn" sortable="true" headerClass="sortable"
         titleKey="itemForm.sn"/>
    <display:column property="type" sortable="true" headerClass="sortable"
         titleKey="itemForm.type"/>
    <display:setProperty name="paging.banner.item_name" value="item"/>
    <display:setProperty name="paging.banner.items_name" value="items"/>
</display:table>

<c:out value="${buttons}" escapeXml="false"/>

<script type="text/javascript">
    highlightTableRows("itemList");
</script>
